<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<table border="1">
    <tr>
        <th>id</th>
        <th>email</th>
        <th>phone</th>
        <th>confirmed</th>
        <th>enabled</th>
        <th>roles</th>
    </tr>
    <c:forEach items="${users}" var="user">
        <tr>
            <td>${user.id}</td>
            <td>${user.email}</td>
            <td>${user.phone}</td>
            <td>${user.confirmed}</td>
            <td>${user.enabled}</td>
            <td>
                <c:set var="first" value="true"/>
                <c:forEach items="${user.roles}" var="role">
                    <c:if test="${not first}">,</c:if>
                    ${role.description}
                    <c:set var="first" value="false"/>
                </c:forEach>
            </td>
        </tr>
    </c:forEach>
</table>